﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace qlvt
{
    class HoaDon
    {
        private static HoaDonDAL dal = new HoaDonDAL();
        public HoaDon()
        {

        }
        public static void LuuHoaDon(string sohd, string mahang, double soluong, double dongia, string diendiai)
        {
            double trigia = soluong * dongia;
            double khuyenmai = 0.0;
            if (trigia > 20000000)
                khuyenmai = (trigia * 5) / 100;
            else
                khuyenmai = 0.0;
            dal.ThemHoaDon(sohd, mahang, soluong, dongia, trigia, khuyenmai, diendiai);
        }
    }
}
